<?php

class AdminModule extends CWebModule
{
    public $defaultController = 'site';
    public $layout = 'admin';
    
	public function init()
	{
		// this method is called when the module is being created
		// you may place code here to customize the module or the application

		parent::init();
        $this->setImport(array(
            'admin.components.*',
            'admin.widgets.*',
            'admin.models.*',
        ));

        Yii::app()->setComponents(array(
            'errorHandler'=>array(
                'class'=>'CErrorHandler',
                'errorAction'=>'admin/site/error',
            ),
            'user' => array('class' => 'AdminUser'),
        ));
        $this->controllerMap=array(
            'ueditor'=>array(
                'class'=>'ext.baiduUeditor.UeditorController',
            ),
        );
	}

}
